package com.app.controller

import com.app.client.PythonServiceClient
import org.springframework.web.bind.annotation.*

/**
 * 调用Python服务的控制器
 */
@RestController
@RequestMapping("/python")
class PythonServiceController(private val pythonServiceClient: PythonServiceClient) {

    /**
     * 调用Python服务的hello接口
     */
    @GetMapping("/hello")
    fun hello(): Map<String, String> {
        return pythonServiceClient.hello()
    }
    
    /**
     * 调用Python服务的数据处理接口
     */
    @PostMapping("/data")
    fun processData(@RequestBody data: Map<String, Any>): Map<String, Any> {
        return pythonServiceClient.processData(data)
    }
}